<?php
// +----------------------------------------------------------------------
// | View 视图服务
// +----------------------------------------------------------------------
// | * 视图层
// | * 1.查询所有关联表的字段
// | * 2.处理字段（可显示、可编辑、可排序、可分组、可过滤）、还要通过临时字段、字段权限进行判断，组装出view需要的字段
// | * 3.组装view视图的表格列
// +----------------------------------------------------------------------
// | 错误编码头 231xxx
// +----------------------------------------------------------------------

namespace common\service;

use support\SingletonTrait;
use Throwable;

class DingAttendanceService
{
    use SingletonTrait;

    /**
     * 考勤记录 (打卡,补卡时调用)
     * @param $data
     * @return array
     */
    public function checkAttendance($data)
    {
//         $data["attendance_class"]; 考勤类型
//         $data["attendance_class"]; 考情途径
        try {
            WorkTimeRecordService::getInstance()->recordWorkTime($data);
        } catch (Throwable $e) {
            trace("attendance deal record_work_time", 'ERR');
            trace(format_exception_info($e), 'ERR');
        }
        return [];
    }
}
